<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style type="text/css">
    #dir {
      width: 300px;
      height: 300px;
      background-color: #00FFFF;
      margin: 0 auto;
    }
  </style>
</head>

<body>
  <div id="dir"></div>
  <script>
    var dir = document.getElementById('dir');
    var i = 0;
    dir.onclick = function () {
      ++i;
      if (i % 2) {
        this.style.width = '200px';
        this.style.height = '200px';
        this.innerHTML = '';
      } else {
        this.style.width = '250px';
        this.style.height = '250px';
        this.innerHTML = '';
      }
    }
  </script>
</body>

</html>